package com.bsb.base.common.config;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public enum WithdrawStatus {
	SUCESS("0","已到账"),
	PENDINGCHECK("1","待审核"),
	PASS("2","审核通过未到账"),
	NOPASS("3","审核不通过"),
	EXCEPTION("4","异常"),
	DONE("5","异常已处理");
	
	private String name;  
    private String index;
    
    
	private WithdrawStatus(String index, String name) {
		this.name = name;
		this.index = index;
	}
	
	
	public static String getName(String index) {  
        for (WithdrawStatus c : WithdrawStatus.values()) {  
            if (c.getIndex().equals(index)) {  
                return c.name;  
            }  
        }  
        return null;  
    }  
	
	 public static List<WithdrawStatus> getList(){
		 List<WithdrawStatus> list = new ArrayList<WithdrawStatus>(Arrays.asList(WithdrawStatus.values()));
		 return list;
	 }
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getIndex() {
		return index;
	}
	public void setIndex(String index) {
		this.index = index;
	}
    
    
}
